#include <iostream>
using namespace std;
int main() {
  int arr[] = {21, 20, 36, 25, 89, 50, 63};
  cout << "排序前" << endl;
  for (int i = 0; i < 7; i++) {
    cout << arr[i] << "\t";
  }
  cout << endl;
  for (int i = 0; i < 7 - 1; i++) {
    for (int j = 0; j < 7 - i - 1; j++) {
      if (arr[j] > arr[j + 1]) {
        int temp = arr[j];
        arr[j] = arr[j + 1];
        arr[j + 1] = temp;
      }
    }
  }
  cout << "排序后" << endl;
  for (int i = 0; i < 7; i++) {
    cout << arr[i] << "\t";
  }
  cout << endl;
  return 0;
}
